package cn.wolfcode._IOday01_.text003;

public class MathUtil {
    private MathUtil(){
    }
    private static MathUtil m = null;
    public static MathUtil getMathUtil(){
        if (m == null){
            m = new MathUtil();
        }
        return m ;
    }
    public double getDivide(double num1 , double num2){
        try {
            if(num2 == 0){
                throw new ArithmeticException();
            }
        }catch(ArithmeticException e){
            System.out.println("输入有误");
        }
        return num1 / num2;
    }
}